.class public final Lnbisdk/gu;
.super Ljava/lang/Object;


# instance fields
.field jI:Ljava/util/Vector;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector",
            "<",
            "Lnbisdk/lm;",
            ">;"
        }
    .end annotation
.end field

.field private jJ:Ljava/util/Hashtable;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Hashtable",
            "<",
            "Ljava/lang/String;",
            "Lnbisdk/lm;",
            ">;"
        }
    .end annotation
.end field

.field private jK:I


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0}, Ljava/util/Vector;-><init>()V

    iput-object v0, p0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    new-instance v0, Ljava/util/Hashtable;

    invoke-direct {v0}, Ljava/util/Hashtable;-><init>()V

    iput-object v0, p0, Lnbisdk/gu;->jJ:Ljava/util/Hashtable;

    const/4 v0, 0x0

    iput v0, p0, Lnbisdk/gu;->jK:I

    return-void
.end method


# virtual methods
.method public final W(Ljava/lang/String;)Lnbisdk/lm;
    .locals 1

    iget-object v0, p0, Lnbisdk/gu;->jJ:Ljava/util/Hashtable;

    invoke-virtual {v0, p1}, Ljava/util/Hashtable;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lnbisdk/lm;

    return-object p0
.end method

.method public final ac(I)Lnbisdk/lm;
    .locals 1

    iget-object v0, p0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    invoke-virtual {v0, p1}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lnbisdk/lm;

    return-object p0
.end method

.method public final destroy()V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/gu;->jJ:Ljava/util/Hashtable;

    iput-object v0, p0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    return-void
.end method

.method public final g(Lnbisdk/ao;)V
    .locals 22

    invoke-virtual/range {p1 .. p1}, Lnbisdk/ao;->ai()Lnbisdk/kr;

    move-result-object v5

    invoke-virtual/range {p1 .. p1}, Lnbisdk/ao;->am()Lcom/nbi/map/data/Rectangle;

    move-result-object v6

    invoke-virtual/range {p1 .. p1}, Lnbisdk/ao;->ib()Lcom/nbi/map/data/Rectangle;

    move-result-object v7

    invoke-virtual/range {p1 .. p1}, Lnbisdk/ao;->getZoomLevel()I

    move-result v8

    invoke-virtual/range {p1 .. p1}, Lnbisdk/ao;->cc()I

    move-result v9

    invoke-virtual {v5}, Lnbisdk/kr;->fC()I

    move-result v10

    invoke-virtual {v5}, Lnbisdk/kr;->fD()I

    move-result v11

    invoke-virtual {v5}, Lnbisdk/kr;->fE()I

    move-result v12

    invoke-virtual {v5}, Lnbisdk/kr;->fF()I

    move-result v13

    invoke-virtual {v6}, Lcom/nbi/map/data/Rectangle;->getWidth()I

    move-result v5

    div-int/2addr v5, v9

    invoke-virtual {v6}, Lcom/nbi/map/data/Rectangle;->getHeight()I

    move-result v6

    div-int/2addr v6, v9

    add-int v14, v10, v5

    add-int v15, v11, v6

    const/16 v16, 0x1

    shl-int v16, v16, v8

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jJ:Ljava/util/Hashtable;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/Hashtable;->clear()V

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/Vector;->size()I

    move-result v17

    mul-int/2addr v5, v6

    move/from16 v0, v17

    move v1, v5

    if-eq v0, v1, :cond_3

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v5, v0

    invoke-virtual {v5}, Ljava/util/Vector;->removeAllElements()V

    :cond_0
    new-instance v5, Lcom/nbi/map/data/Rectangle;

    invoke-virtual {v7}, Lcom/nbi/map/data/Rectangle;->getWidth()I

    move-result v6

    div-int/lit8 v6, v6, 0x2

    sub-int v6, v12, v6

    invoke-virtual {v7}, Lcom/nbi/map/data/Rectangle;->getHeight()I

    move-result v17

    div-int/lit8 v17, v17, 0x2

    sub-int v17, v13, v17

    invoke-virtual {v7}, Lcom/nbi/map/data/Rectangle;->getWidth()I

    move-result v18

    invoke-virtual {v7}, Lcom/nbi/map/data/Rectangle;->getHeight()I

    move-result v7

    move-object v0, v5

    move v1, v6

    move/from16 v2, v17

    move/from16 v3, v18

    move v4, v7

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/nbi/map/data/Rectangle;-><init>(IIII)V

    const/4 v5, 0x0

    const/4 v6, 0x0

    move v7, v6

    move v6, v10

    :goto_0
    if-ge v6, v14, :cond_6

    move/from16 v17, v5

    move/from16 v18, v7

    move v7, v11

    :goto_1
    if-ge v7, v15, :cond_5

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v5, v0

    invoke-virtual {v5}, Ljava/util/Vector;->size()I

    move-result v5

    move v0, v5

    move/from16 v1, v18

    if-le v0, v1, :cond_4

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v5, v0

    move-object v0, v5

    move/from16 v1, v18

    invoke-virtual {v0, v1}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lnbisdk/lm;

    :goto_2
    invoke-virtual/range {p1 .. p1}, Lnbisdk/ao;->isTrafficLayerVisible()Z

    move-result v19

    move-object v0, v5

    move/from16 v1, v19

    invoke-virtual {v0, v1}, Lnbisdk/lm;->C(Z)V

    invoke-virtual/range {p1 .. p1}, Lnbisdk/ao;->isRouteLayerVisible()Z

    move-result v19

    move-object v0, v5

    move/from16 v1, v19

    invoke-virtual {v0, v1}, Lnbisdk/lm;->D(Z)V

    invoke-virtual {v5, v8}, Lnbisdk/lm;->setTz(I)V

    invoke-virtual {v5, v9}, Lnbisdk/lm;->I(I)V

    rem-int v19, v6, v16

    if-gez v19, :cond_1

    add-int v19, v19, v16

    :cond_1
    move-object v0, v5

    move/from16 v1, v19

    invoke-virtual {v0, v1}, Lnbisdk/lm;->setTx(I)V

    sub-int v19, v6, v10

    mul-int v19, v19, v9

    move-object v0, v5

    move/from16 v1, v19

    invoke-virtual {v0, v1}, Lnbisdk/lm;->aG(I)V

    rem-int v19, v7, v16

    if-gez v19, :cond_2

    add-int v19, v19, v16

    :cond_2
    move-object v0, v5

    move/from16 v1, v19

    invoke-virtual {v0, v1}, Lnbisdk/lm;->setTy(I)V

    sub-int v19, v7, v11

    mul-int v19, v19, v9

    move-object v0, v5

    move/from16 v1, v19

    invoke-virtual {v0, v1}, Lnbisdk/lm;->aH(I)V

    invoke-virtual {v5}, Lnbisdk/lm;->ip()I

    move-result v19

    div-int/lit8 v20, v9, 0x2

    add-int v19, v19, v20

    invoke-virtual {v5}, Lnbisdk/lm;->iq()I

    move-result v20

    div-int/lit8 v21, v9, 0x2

    add-int v20, v20, v21

    sub-int v21, v12, v19

    sub-int v19, v12, v19

    mul-int v19, v19, v21

    sub-int v21, v13, v20

    sub-int v20, v13, v20

    mul-int v20, v20, v21

    add-int v19, v19, v20

    move-object v0, v5

    move/from16 v1, v19

    invoke-virtual {v0, v1}, Lnbisdk/lm;->setPriority(I)V

    invoke-virtual {v5}, Lnbisdk/lm;->getPriority()I

    move-result v19

    move/from16 v0, v19

    move/from16 v1, v17

    invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I

    move-result v17

    add-int/lit8 v18, v18, 0x1

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jJ:Ljava/util/Hashtable;

    move-object/from16 v19, v0

    invoke-virtual {v5}, Lnbisdk/lm;->ir()Ljava/lang/String;

    move-result-object v20

    move-object/from16 v0, v19

    move-object/from16 v1, v20

    move-object v2, v5

    invoke-virtual {v0, v1, v2}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v5, v7, 0x1

    move v7, v5

    goto/16 :goto_1

    :cond_3
    const/4 v5, 0x0

    move v6, v5

    :goto_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v5, v0

    invoke-virtual {v5}, Ljava/util/Vector;->size()I

    move-result v5

    if-ge v6, v5, :cond_0

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v5, v0

    invoke-virtual {v5, v6}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lnbisdk/lm;

    invoke-virtual {v5}, Lnbisdk/lm;->il()V

    add-int/lit8 v5, v6, 0x1

    move v6, v5

    goto :goto_3

    :cond_4
    new-instance v5, Lnbisdk/lm;

    invoke-direct {v5}, Lnbisdk/lm;-><init>()V

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object/from16 v19, v0

    move-object/from16 v0, v19

    move-object v1, v5

    invoke-virtual {v0, v1}, Ljava/util/Vector;->addElement(Ljava/lang/Object;)V

    goto/16 :goto_2

    :cond_5
    add-int/lit8 v5, v6, 0x1

    move v6, v5

    move/from16 v7, v18

    move/from16 v5, v17

    goto/16 :goto_0

    :cond_6
    const-string v6, "updateTileList"

    const-string v7, ""

    invoke-static {v6, v7}, Lnbisdk/x$1;->a(Ljava/lang/String;Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v6, v0

    invoke-virtual {v6}, Ljava/util/Vector;->size()I

    move-result v6

    div-int/2addr v5, v6

    move-object/from16 v0, p0

    iget v0, v0, Lnbisdk/gu;->jK:I

    move v6, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v7, v0

    invoke-virtual {v7}, Ljava/util/Vector;->size()I

    move-result v7

    add-int/2addr v6, v7

    add-int/lit8 v6, v6, 0x1

    move v0, v6

    move-object/from16 v1, p0

    iput v0, v1, Lnbisdk/gu;->jK:I

    const/4 v6, 0x0

    :goto_4
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v7, v0

    invoke-virtual {v7}, Ljava/util/Vector;->size()I

    move-result v7

    if-ge v6, v7, :cond_7

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v7, v0

    invoke-virtual {v7, v6}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lnbisdk/lm;

    move-object/from16 v0, p0

    iget v0, v0, Lnbisdk/gu;->jK:I

    move v7, v0

    invoke-virtual/range {p1 .. p1}, Lnbisdk/lm;->getPriority()I

    move-result v8

    div-int/2addr v8, v5

    sub-int/2addr v7, v8

    move-object/from16 v0, p1

    move v1, v7

    invoke-virtual {v0, v1}, Lnbisdk/lm;->setPriority(I)V

    add-int/lit8 v6, v6, 0x1

    goto :goto_4

    :cond_7
    const/4 v5, 0x0

    :goto_5
    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v6, v0

    invoke-virtual {v6}, Ljava/util/Vector;->size()I

    move-result v6

    if-ge v5, v6, :cond_8

    move-object/from16 v0, p0

    iget-object v0, v0, Lnbisdk/gu;->jI:Ljava/util/Vector;

    move-object v6, v0

    invoke-virtual {v6, v5}, Ljava/util/Vector;->elementAt(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lnbisdk/lm;

    move-object/from16 v0, p1

    move v1, v5

    invoke-virtual {v0, v1}, Lnbisdk/lm;->setIndex(I)V

    const-string v6, "updateTileList"

    add-int/lit8 v5, v5, 0x1

    goto :goto_5

    :cond_8
    return-void
.end method
